<?php
class Product extends AppModel{
	var $name = 'Product';
	var $useTable = 'products';
	var $primaryKey = 'id';
	
	function loadType() {
		$this->bindModel(
			 array(
			 	'belongsTo' => array (
					'ProductType' => array(
						'className' => 'ProductType',
						'foreignKey' => 'type'
					)
				)
			), 
			false
		);
	}
	
	function loadSupplier() {
		$this->bindModel(
			 array(
			 	'belongsTo' => array (
					'Supplier' => array(
						'className' => 'Supplier',
						'foreignKey' => 'sanxuat'
					)
				)
			), 
			false
		);
	}
	
	
}
?>
